import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../pages/Home.vue'
import QuestionDetail from '../pages/QuestionDetail.vue' // 问卷
import Exam from '../pages/Exam.vue' // 问卷
import Case from '../pages/Case.vue'
import Search from '../pages/Search.vue' // 搜索
import My from '../pages/My.vue' // 个人中心
import Activate from '../pages/Activate.vue' // 个人中心

const routerHistory = createWebHashHistory()

const router = createRouter({
  history: routerHistory,
  routes: [
    {
      path: '/home',
      component: Home,
      meta: { keepAlive: true, hidetopbar: false, leftArrow: true, title: '选择考试科目' }
    },
    {
      path: '/question',
      component: QuestionDetail,
      meta: { keepAlive: true, hidetopbar: false, leftArrow: true, title: '练题' }
    },
    {
      path: '/case',
      component: Case,
      meta: { keepAlive: true, hidetopbar: false, leftArrow: true, title: '案例题' }
    },
    {
      path: '/exam',
      component: Exam,
      meta: { keepAlive: true, hidetopbar: false, leftArrow: true, title: '随机考试' }
    },
    {
      path: '/search',
      component: Search,
      meta: { keepAlive: true, hidefooter: false, leftArrow: true, title: '搜索' }
    },
    {
      path: '/activate',
      component: Activate,
      meta: { keepAlive: true, hidefooter: true, leftArrow: false, title: '会员激活' }
    },
    {
      path: '/my',
      component: My,
      meta: { leftArrow: true, title: '个人中心' }
    }
  ]
})

export default router